-- GENERATED SPELL FOR [Scryer Guardian] --


function spell0_19504(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(15228,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19504', 3000, 1)
end

function spell1_19504(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(17195,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19504', 1500, 1)
end

function spell2_19504(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19504', 10000, 1)
end

function Sorts_19504(pUnit, Event)
local choix_sorts_19504 = math.random(0, 2)
if choix_sorts_19504 == 0 then
pUnit:RegisterEvent('spell0_19504', 1, 1)
end
if choix_sorts_19504 == 1 then
pUnit:RegisterEvent('spell1_19504', 1, 1)
end
if choix_sorts_19504 == 2 then
pUnit:RegisterEvent('spell2_19504', 1, 1)
end
end

function mob19504_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19504', math.random(1500, 3000), 1)
end

function mob19504_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19504_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19504_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19504, 1, 'mob19504_Action')
RegisterUnitEvent(19504, 2, 'mob19504_Leave')
RegisterUnitEvent(19504, 3, 'mob19504_Kill')
RegisterUnitEvent(19504, 4, 'mob19504_Die')
